import java.util.HashSet;
import java.util.Set;

public class Solution1805 {
    public int numDifferentIntegers(String word) {
        String[] s=word.split("[a-z]+");
        Set<String> set=new HashSet<>();
        for (String s1 : s) {
            if (s1.length()>0){
                set.add(deal(s1));
            }
        }
        return set.size();
    }

    private String deal(String s1) {
        while (s1.length()>0 && s1.startsWith("0")){
            s1=s1.substring(1);
        }
        return s1;
    }

    public static void main(String[] args) {
        System.out.println(new Solution1805().numDifferentIntegers("a1b01c001"));
    }
}
